package com.example.demo.controller;

import com.example.demo.service.ShutDownService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @desc: <br/>
 * @author: Jingbo Hu<br/>
 * @time：2021年06⽉11⽇<br/>
 * @version：v1.0.0<br>
 */
@RestController
@Slf4j
public class ShutDownController {

    @Autowired
    ShutDownService shutDownService;

    @RequestMapping("/shutdown")
    public String print() {
        shutDownService.shutdown();
        return "等待任务执行完成";
    }

}
